A computer system can be generally divided into four components: the hardware, the operating system, the application programs and the users. The hardware (central processing unit (CPU), memory and input/output (I/O) devices) provides the basic computing resources. The application programs (database systems, games business programs (database systems, etc.) define the ways in which these resources are used to solve the computing problems of the users. The operating system controls and coordinates the use of the hardware among the various application programs for the various users. In doing so, one goal of the operating system is to make the computer system convenient to use. A secondary goal is to use the hardware in an efficient manner.
The Unix operating system is one example of an operating system that is currently used by many enterprise computer systems. Unix was designed to be a simple time-sharing system, with a hierarchical file system, which supported multiple processes. A process is the execution of a program and consists of a pattern of bytes that the CPU interprets as machine instructions (text), data and stack. A stack defines a set of hardware registers or a reserved amount of main memory that is used for arithmetic calculations.
Unix consists of two separable parts: the “kernel” and the “system programs.” Systems programs consist of system libraries, compilers, interpreters, shells and other such programs which provide useful functions to the user. The kernel is the central controlling program that provides basic system facilities. The Unix kernel creates and manages processes, provides functions to access file-systems, and supplies communications facilities.
The Unix kernel is the only part of Unix that a user cannot replace. The kernel also provides the file system, CPU scheduling, memory management and other operating-system functions by responding to “system-calls.” Conceptually, the kernel is situated between the hardware and the users. System calls are the means for the programmer to communicate with the kernel.
System calls are made by a “trap” to a specific location in the computer hardware (sometimes called an “interrupt” location or vector). Specific parameters are passed to the kernel on the stack and the kernel returns with a code in specific registers indicating whether the action required by the system call was completed successfully or not.
The kernel comprises data structures which enable application programs to utilize the kernel. FIG. 1 is an illustration of a prior art kernel data structure 100. As shown in FIG. 1, the kernel data structure 100 comprises entries 101–106. Each of entries 101–106 comprises an offset of the address location for that entry in memory, the data 110 stored in the entry and the corresponding length of the data. The data portion 110 may be broken into many individual “fields” F1–F4 that all relate to the entry. Typically the information contained in a data structure is “static” that is, the size of the data portions 110 for each entry is fixed. Typically, the number of fields is fixed. A number of applications, such as the Solaris Basic Security Module (BSM) and Trusted Solaris relating to a Unix derivative operating system, such as the SUNOS™, have a need to keep project-specific data associated with the kernel data structure. These projects are optional additions to the base operation of the SUNOS™.
When taken together, these projects would needlessly increase the “static” size of the associated kernel data structures. The static nature of the data structure 110 makes it difficult for programmers to add extensions to the structure 110 once the structure is created because the data size is fixed. Any attempt to modify any one of the entries 101–106 would result in the size of the data structure 100 being modified. The change in size would prevent any application programs created prior to the modification of any one of the entries 101–106 to not work with that particular data structure in the underlying kernel.
A change to any of the data structure 101–106 would also lead to a displacement for other programs that use the structure. This will require the underlying kernel to be recompiled. This can be costly and time consuming.